<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>poi导入测试</title>
    <link rel="stylesheet" href="layuimini/lib/layui-v2.6.3/css/layui.css" media="all">
</head>
<body>

<button type="button" class="layui-btn" id="test1">
    <i class="layui-icon">&#xe67c;</i>导入
</button>


<script src="layuimini/lib/layui-v2.6.3/layui.js"></script>
<script>
    layui.use('upload', function(){
        var upload = layui.upload;

        //执行实例
        var uploadInst = upload.render({
            elem: '#test1' //绑定元素
            ,url: '/daoru' //上传接口
            ,accept:'file'
            ,done: function(res){
                //上传完毕回调
                console.log(res.state);

            }
            ,error: function(){
                //请求异常回调
                console.log("异常");
            }
        });
    });
</script>

</body>
</html>